<?
	require_once "../../_func/__Global.php";
	require_once "../../_func/__Local.php";
	require_once "../../_func/__MysqlFunc.php";
	require_once "../../_func/_CodeFunc.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>:: 농협전북지부 ERP시스템 ::</title>
<link href="../css/layout.css" type="text/css" rel="stylesheet" />
<link type="text/css" href="/css/hot-sneaks/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.18.custom.min.js"></script>
<script type="text/javascript" src="/js/common.js"></script>
<script type="text/javascript" src="/js/print_excel.js"></script>
<script type="text/javascript">
	function search()
	{
		document.theForm.submit();
	}
</script>
</head>

<body>
<div id="wrap">
<!-- header start -->
<? include("../_layout/head.inc"); ?>
<!-- header end -->

<!-- search start -->
<? include("./item_search.php"); ?>
<!-- search end -->

<!-- container start -->
	<div id="container">
    	<div class="subtit">
        	<p class="subtt08"><span>조회 > 원물재고조회</span></p>
		</div>
        <div class="contents">
        	<p class="tableTitle"><span class="b"></span>조회</p>
			<form name="theForm" id="theForm" method="post" action="item_check_original.html">
			<input type="hidden" name="menu1" id="menu1" value="<?=$menu1?>" />
			<input type="hidden" name="menu2" id="menu2" value="<?=$menu2?>" />
        	<table cellpadding="0" cellspacing="1" border="0" class="erpTable sTB">
                <tr>
                	<th>품목</th>
                    <td>
                    	<select	name="jseq" id="jseq">
							<option value="">농협명</option>
							<?
								$codedata = & JBNH_GetSelect(0);
								JBNH_PrintOption($codedata, $jseq);
							?>
                        </select>
                    </td>
                    <td>
                    	<select name="item1" id="item1" onchange="fncGetItemJSON('item', 2, this.value, $('#item2'));">
                        	<option value="">품목</option>
							<?
								$codedata = & Code_GetSelect("A", 1, 0,false);
								Code_PrintOption($codedata, 1, $item1);
							?>
                        </select>
                    </td>
                    <td>
                    	<select name="item2" id="item2">
                        	<option value="">품종</option>
                        </select>
						<input type="hidden" name="oitem2" id="oitem2" value="<?=$item2?>" />
                    </td>
                </tr>
            </table>
            <div class="BtnList">
            	<ul>
                	<li><input type="button" class="btn_inquiry" onclick="search()" title="조회"/></li>
                </ul>
            </div>
			</form>


            <p class="tableTitle"><span class="b"></span>원물재고조회</p>
			<div class="BtnList2">
				<p>
				<input type="button" class="btn_excel" onClick="MNG.fncRtnfunc('excel');" title="엑셀로다운받기"/>
                <input type="button" class="btn_print" onClick="MNG.fncRtnfunc('print');" title="출력하기"/>
				</p>
			</div>
			<input type="hidden" name="printtitle" id="printtitle" value="원물재고리스트" />
            <table cellpadding="0" cellspacing="1" border="0" class="erpTable" id="printtable">
            	<colgroup>
				<col width="3%" />
				</colgroup>

				<tr>
					<th></th>
                    <th>농협명</th>
                    <th>품목</th>
                    <th>품종</th>
                    <th>합계</th>
				</tr>
<!-- list start -->
<? include("./item_check_original_list.php"); ?>
<!-- list end -->
                <tr>
                	<td colspan="5" class="total">합계 : <?=number_format($sum)?> Kg </td>
                </tr>
            </table>
        </div>
    </div>
<!-- footer start -->
<? include("../_layout/footer.inc"); ?>
<!-- footer end -->
</div>
</body>
</html>
